package com.hfzy.ihk.facade.linkcall.enums;

import com.hfzy.ihk.common.facade.CustomEnumType;

import java.util.HashMap;
import java.util.Map;

/**
 * 流程节点类型
 * */
public enum  SpeakingFlowType implements CustomEnumType {
    MAIN("main", "主动流程"),
    MultiWheel("multiWheel", "多轮会话");


    private SpeakingFlowType(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;

    private String desc;

    @Override
    public String getValue() {
        return value;
    }
    @Override
    public String getDesc() {
        return desc;
    }

    private static Map<String, SpeakingFlowType> map = new HashMap<>();
    static {
        for (SpeakingFlowType value : SpeakingFlowType.values()) {
            map.put(value.getValue(), value);
        }
    }

    public static SpeakingFlowType fromValue(String value) {
        SpeakingFlowType ret = map.get(value);
        if (ret != null) {
            return ret;
        } else {
            throw new IllegalArgumentException("No enum const " + SpeakingFlowType.class + "." + value);
        }
    }
}
